// ITI 1120 Winter 2009, Lab 2, Question 3
// Name: Dinesh B, Student# 1234567

import java.util.Scanner;

class ConvertFtoC
{ /**
  * This program converts a temperature from degrees Fahrenheit to degrees Celsuis.
  */
 
    public static void main (String[] args)
    {
        // DECLARE VARIABLES/DATA DICTIONARY 
        double fahrenheit; // temperature in degrees Fahrenheit        
        double celcius;  // temperature in degrees Celsius

        // PRINT OUT IDENTIFICATION INFORMATION
        System.out.println("ITI 1120 Winter 2012, Lab 2, Question 3");
        System.out.println("Name: Dinesh B, #1234567");

        // Read in the given values
     
        System.out.println( "Enter a temperature in degrees Fahrenheit:" );
        fahrenheit = ITI1120.readDouble( );
                
        // Call method to use the method implementing the algorithm
        celcius = calculateCelsuis (fahrenheit);
            
        // Diplay the result
        System.out.println( "The temperature in degrees Celsius is " + celcius );

    }


    // Method: calculateCelsuis
    // Description: converts the givem degree in Fahrenheit to Celsuis.
    // Givens: temperatureF - temperature in Farenheit
    private static double calculateCelsuis(double temperatureF)
    {
     // Declaration of the result variable 
     double temperatureC;
     // The computation
     temperatureC = ( temperatureF - 32.0 ) * 5.0 / 9.0;
     // Return the result
     return(temperatureC);
    }
     
} // Don't remove this brace bracket!
